﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WCFClient
{
    public partial class FormConsumeIISWCF : Form
    {
        public FormConsumeIISWCF()
        {
            InitializeComponent();
        }

        IISRoleService.RoleServiceClient roleClient = new IISRoleService.RoleServiceClient();
        IISUserService.UserServiceClient userClient = new IISUserService.UserServiceClient();
        private void button1_Click(object sender, EventArgs e)
        {

            IISUserService.UserInfo user = userClient.GetUser((this.textBox1.Text));
            MessageBox.Show(user.Name + "--" + user.Id);

            MessageBox.Show(roleClient.GetUser(5).Name);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            MessageBox.Show(userClient.Show());
        }

    }
}
